package com.cxx.purchasecharge.dal;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import com.cxx.purchasecharge.core.model.persistence.Contact;
import com.cxx.purchasecharge.dal.common.GenericCRUDDao;

@Transactional
public interface ContactDao extends GenericCRUDDao <Contact, Long>, ContactDaoPlus
{

    public Contact findByName (String name);

    @Query (value = "select c from Contact c where c.customer.id=?1")
    public List <Contact> findByCustomer (long customerId);

}
